<template>
<view class="body">
		<form class="calculator" @submit="submit">
			<view class="base">
				<view class="border">
					<view class="title">所在城市</view>
					<view class="left">
						<view class="city">
							<picker name="city" mode="selector" :value="cityIndex" :range="city" @change="citySelect">
								<view class="content">{{city[cityIndex]}}</view>
							</picker>
						</view>
						<image src="http://imgbdb3.bendibao.com/whbdb/202010/23/20201023123927_93669.png" class="back"></image>
					</view>
				</view>
				<view class="border">
					<view class="title">参保类型</view>
					<view class="left">
						<view class="type">
							<picker name="type" mode="selector" :value="typeIndex" :range="type" @change="typeSelect">
								<view class="content">{{type[typeIndex]}}</view>
							</picker>
						</view>
						<image src="http://imgbdb3.bendibao.com/whbdb/202010/23/20201023123927_93669.png" class="back"></image>
					</view>
				</view>
				<view class="border">
					<view class="title">参保基数</view>
					<view class="left">
						<view class="base-num">
							<input name="baseNum" :disabled="isMinNum" @blur="baseNumInput" data-type="base" :value="minNum" type="number" :placeholder="'填写范围：' + shebaoMin + '-' + shebaoMax">
							<text>元</text>
						</view>
					</view>
				</view>
				<view class="border">
					<view class="title">最低基数</view>
					<view class="left">
						<view class="min-num">
							<switch type="switch" name="minNum" color="#FF6600" @change="minBase"></switch>
						</view>
					</view>
				</view>
			</view>
			<view class="other">
				<view class="border">
					<view class="title">缴纳公积金</view>
					<view class="left">
						<view class="payment">
							<switch name="payment" type="switch" @change="switchGjj" color="#FF6600"></switch>
						</view>
					</view>
				</view>
				<view class="gjj" v-if="gjjSwitch">
					<view class="border">
						<view class="title">缴存基数</view>
						<view class="left">
							<view class="base-num">
								<input name="payBaseNum" :disabled="isPayMinNum" @blur="baseNumInput" data-type="pay" :value="payMinNum" type="number" :placeholder="'填写范围：' + gongjijinMin + '-' + gongjijinMax">
								<text>元</text>
							</view>
						</view>
					</view>
					<view class="border">
						<view class="title">最低基数</view>
						<view class="left">
							<view class="min-num">
								<switch name="payMinNum" type="switch" color="#FF6600" @change="minBase" data-type="pay"></switch>
							</view>
						</view>
					</view>
					<view class="border">
						<view class="title">个人缴存比例</view>
						<view class="left">
							<view class="proportion base-num">
								<input name="proportion" @blur="baseNumInput" :value="baseInput" type="number" placeholder="5-12" placeholder-class="input-placeholder">
								<text>%</text>
							</view>
						</view>
					</view>
				</view>
			</view>
			<view class="control">
				<navigator class="to-major" target url="/pages/major/major" hover-class="navigator-hover" open-type="navigate">
					<image src="http://imgbdb3.bendibao.com/whbdb/202010/23/20201023123952_96516.png" class="tips"></image>
					<text>快去使用五险一金专业计算器，让计算变得精准</text>
					<text class="to">去查看>></text>
				</navigator>
				<button class="start-cal" form-type="submit">开始计算</button>
			</view>
		</form>
		<tools :title="title" :path="path"></tools>
	</view>
</template>

<script>


</script>
<style>
.tips {
    width: 26rpx;
    height: 20rpx;
    margin-right: 14rpx;
}

.border {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 34rpx 36rpx;
    border-bottom: 2rpx solid #F1F1F1;
}

.title {
    font-size: 32rpx;
    color: #000000;
    font-weight: 500;
}

.back {
    width: 18rpx;
    height: 29rpx;
}

.content {
    margin-right: 23rpx;
}

.left {
    display: flex;
    align-items: center;
}

.sy-box {
    margin-top: 50rpx;
}

.title-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 27rpx;
}

.title {
    display: flex;
    flex-direction: row;
    align-items: center;
}

.title image {
    width: 16rpx;
    height: 28rpx;
    margin-right: 10rpx;
}

.title text {
    font-size: 32rpx;
    font-weight: bold;
    color: #141414;
}

.base-num {
    display: flex;
    margin-right: 19rpx;
}

switch {
    transform: scale(.8);
}

.other {
    border-top: 20rpx solid #F2F2F2;
}

.input-placeholder {
    text-align: right;
}

input {
    width: 400rpx;
    margin-right: 19rpx;
    text-align: right;
}

.control {
    padding: 35rpx 36rpx;
    background-color: rgb(242, 242, 242);
}

.to-major {
    height: 60rpx;
    border-radius: 30rpx;
    line-height: 60rpx;
    font-size: 22rpx;
    color: #000000;
    text-align: center;
    background-color: #F5E2CF;
}

.to {
    margin-left: 23rpx;
    color: #FF6600;
}

.start-cal {
    height: 90rpx;
    margin-top: 32rpx;
    font-size: 34rpx;
    line-height: 90rpx;
    color: #FFFFFF;
    text-align: center;
    border-radius: 15rpx;
    background-color: #FF6600;
}

.cal-func {
    padding: 33rpx 0;
    padding-left: 36rpx;
}

.swiper-item {
    position: relative;
}

.swiper-img {
    height: 276rpx;
    border-radius: 16rpx;
}

.swiper-text {
    position: absolute;
    bottom: 35rpx;
    left: 36rpx;
    color: #FFFFFF;
    font-size: 32rpx;
}

.tools {
    padding: 0 37rpx;
    margin-bottom: 40rpx;
    border-top: 20rpx solid #F2F2F2;
}

.scroll-border {
    display: flex;
    align-items: center;
    height: 265rpx;
}

.tools-item {
    width: 185rpx;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 23rpx;
    padding-top: 59rpx;
    padding-bottom: 39rpx;
    margin-top: 20rpx;
    margin-left: 37rpx;
    box-shadow: 0px 0px 14rpx 0px rgba(4, 0, 0, 0.2);
    border-radius: 10rpx;
    background-color: #FFFFFF;
    box-sizing: border-box;
}

.tools-item:first-child {
    margin-left: 14rpx;
}

.special {
    position: absolute;
    top: -16rpx;
}

.special image {
    width: 61rpx;
    height: 48rpx;
}

.icon {
    width: 74rpx;
    height: 74rpx;
}

.name {
    margin-top: 40rpx;
    font-size: 26rpx;
    color: #000000;
}

.desc {
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    word-break: break-all;
    margin-top: 23rpx;
    font-size: 20rpx;
    color: #999999;
}

.bottom {
    height: 166rpx;
    background-color: #F2F2F2;
}
</style>